#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
class Solution 
{
public:
    bool canConstruct(string ransomNote, string magazine)
    {
        for (int i = 0; i < ransomNote.size(); i++)
        {
            int pos = magazine.find(ransomNote[i]);
            if (pos == -1)
                return false;
            else
                magazine[pos] = '0';
        }
        return true;
    }
};
int main()
{
    Solution s1;
    string ransomNote;
    string magazine;
    s1.canConstruct(ransomNote,magazine);
	return 0;
}